package com.dog.basics.bean.dto.api.mtkj;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.List;

@Data
public class ApiGoodAddDto {

    /**
     * 商品名称
     */
    @NotNull(message = "商品名称不能为空")
    @ApiModelProperty(value = "商品名称", dataType = "String", required = true)
    @Size(min = 1,max = 30,message = "格式不正确")
    private String name;

    /**
     * 商品类型id
     */
    @NotNull(message = "商品类型id不能为空")
    @ApiModelProperty(value = "商品名称", dataType = "Long", required = true)
    private Long typeId;

    /**
     * 店铺ID
     */
    @NotNull(message = "店铺ID不能为空")
    @ApiModelProperty(value = "店铺ID", dataType = "Long", required = true)
    private Long shopId;

    /**
     * 商品价格
     */
    @NotNull(message = "商品价格不能为空")
    @ApiModelProperty(value = "商品价格", dataType = "BigDecimal", required = true)
    private BigDecimal price;

    /**
     * 销售数量
     */
    @NotNull(message = "销售数量不能为空")
    @ApiModelProperty(value = "销售数量", dataType = "Integer", required = true)
    private Integer sales;

    /**
     * 商品简介，促销语
     */
    @NotNull(message = "商品简介不能为空")
    @ApiModelProperty(value = "商品简介", dataType = "String", required = true)
    @Size(min = 0,max = 255,message = "商品主图不正确")
    private String introduction;

    /**
     * 商品主图
     */
    @NotNull(message = "商品主图不能为空")
    @ApiModelProperty(value = "商品主图", dataType = "String", required = true)
    @Size(min = 0,max = 255,message = "商品主图不正确")
    private String picture;
    /**
     * 轮播图
     */
    @NotEmpty(message = "轮播图不能为空")
    @ApiModelProperty(value = "轮播图",dataType = "List<String>", required = true)
    private List<String> imgs;
    /**
     * 商品详情(json数据 多图)
     */
    @NotNull(message = "商品详情不能为空")
    @ApiModelProperty(value = "商品详情(json数据 多图)", dataType = "String", required = true)
    private String description;

    /**
     * 是否热销商品 0是 1否
     */
    @ApiModelProperty(value = "是否热销商品 0是 1否", dataType = "Integer", required = true)
    private Integer isHot;

    /**
     * 是否推荐 0是 1 否
     */
    @ApiModelProperty(value = "是否推荐 0是 1 否", dataType = "Integer", required = true)
    private Integer isRecommend;

    /**
     * 是否新品 0是 1否
     */
    @ApiModelProperty(value = "是否新品 0是 1 否", dataType = "Integer", required = true)
    private Integer isNew;

    /**
     * 商品状态 0下架，1正常，9违规（禁售）
     */
    @ApiModelProperty(value = "商品状态 0下架，1正常，9违规（禁售）", dataType = "Integer", required = true)
    private Integer status;

    /**
     * 生产日期
     */
    @ApiModelProperty(value = "生产日期", dataType = "Long", required = false)
    private Long productionDate;

    /**
     * 保质期
     */
    @ApiModelProperty(value = "保质期", dataType = "String", required = false)
    @Size(min = 0,max = 50,message = "格式不正确")
    private String shelfLife;

    /**
     * 是否支持预售 0 支持 1 不支持
     */
    @ApiModelProperty(value = "是否支持预售 0 支持 1 不支持", dataType = "Integer", required = false)
    private Integer isOpenPresell;

    /**
     * 商品单位
     */
    @ApiModelProperty(value = "商品单位", dataType = "String", required = true)
    @Size(min = 0,max = 20,message = "商品单位不正确")
    private String goodsUnit;

    @NotNull(message = "商品规格不能为空")
    @ApiModelProperty(value = "商品规格不能为空", dataType = "String", required = true)
    private List<ApiGoodsSkuEditDto> goodsSkuList;

}
